package com.gyg;

import com.gyg.util.FTPUtil;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.Arrays;

/**
 * <des>
 *
 * <des>
 *
 * @create Date 2021-11-02
 **/
public class Test {
    public static void main(String[] args) throws FileNotFoundException {
        String hostname = "192.168.123.96";
        int port = 12333;
        String username = "pc";
        String password = "123456";
        String workingPath = "/upload";
        String str = "C:\\Users\\Administrator\\Desktop\\touxiang.png";
        InputStream fileInputStream = new FileInputStream(new File(str));
        String saveName = "touxiang.png";
        FTPUtil.upload(hostname, port, username, password, workingPath, fileInputStream, saveName);

    }
}
